package collection.stack;

public class   StackTest {
    public static void main(String[] args) {
        Stack<String> stack = new Stack<String>();

        for (String s : "My do has fleas".split(" ")) {
            stack.push(s);
        }
        while (!stack.empty()) {
            System.out.println(stack.pop() + " ");
        }

    }
}
